package cn.wolfcode.car.business.mapper;

import cn.wolfcode.car.business.domain.ServiceItem;
import cn.wolfcode.car.business.qo.ServiceItemQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ServiceItemMapper {

    int delete(Long id);

    int insert(ServiceItem serviceItem);

    ServiceItem selectOne(Long id);

    List<ServiceItem> selectAll();

    int update(ServiceItem serviceItem);

    List<ServiceItem> selectForList(ServiceItemQueryObject qo);

    /**
     * 上架 下架功能
     * @param saleStatus    上下架状态
     * @param id            需要修改的数据 id 值
     */
    void changeSale(@Param("saleStatus") Integer saleStatus, @Param("id") Long id);

    void changeStatus(@Param("status") Integer status, @Param("id") Long id);
}